package com.wushi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wushi.mapper.BookBorrowMapper;
import com.wushi.domain.BookBorrow;
import com.wushi.service.IBookBorrowService;
import com.ruoyi.common.core.text.Convert;

/**
 * 书籍借阅Service业务层处理
 * 
 * @author wushi
 * @date 2024-11-19
 */
@Service
public class BookBorrowServiceImpl implements IBookBorrowService 
{
    @Autowired
    private BookBorrowMapper bookBorrowMapper;

    /**
     * 查询书籍借阅
     * 
     * @param id 书籍借阅主键
     * @return 书籍借阅
     */
    @Override
    public BookBorrow selectBookBorrowById(Long id)
    {
        return bookBorrowMapper.selectBookBorrowById(id);
    }

    /**
     * 查询书籍借阅列表
     * 
     * @param bookBorrow 书籍借阅
     * @return 书籍借阅
     */
    @Override
    public List<BookBorrow> selectBookBorrowList(BookBorrow bookBorrow)
    {
        return bookBorrowMapper.selectBookBorrowList(bookBorrow);
    }

    /**
     * 新增书籍借阅
     * 
     * @param bookBorrow 书籍借阅
     * @return 结果
     */
    @Override
    public int insertBookBorrow(BookBorrow bookBorrow)
    {
        return bookBorrowMapper.insertBookBorrow(bookBorrow);
    }

    /**
     * 修改书籍借阅
     * 
     * @param bookBorrow 书籍借阅
     * @return 结果
     */
    @Override
    public int updateBookBorrow(BookBorrow bookBorrow)
    {
        return bookBorrowMapper.updateBookBorrow(bookBorrow);
    }

    /**
     * 批量删除书籍借阅
     * 
     * @param ids 需要删除的书籍借阅主键
     * @return 结果
     */
    @Override
    public int deleteBookBorrowByIds(String ids)
    {
        return bookBorrowMapper.deleteBookBorrowByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除书籍借阅信息
     * 
     * @param id 书籍借阅主键
     * @return 结果
     */
    @Override
    public int deleteBookBorrowById(Long id)
    {
        return bookBorrowMapper.deleteBookBorrowById(id);
    }
}
